package src

import (
	"net/http"

	"github.com/gin-gonic/gin"
)

func SetRoute(r *gin.Engine) {
	r.GET("/health", func(c *gin.Context) {
		//输出json结果给调用方
		c.JSON(http.StatusOK, gin.H{"message": "ok"})
	})

	r.GET("/", Home)
	r.GET("/config", GetSet)
	r.GET("/fallback", FallBack)
	r.POST("/config", PostSet)
	r.POST("/editItem", EditItem)
	r.DELETE("/editItem", RemoveItem)
}
